<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../scripts/jquery.js" type="text/javascript"></script>
<script src="js/jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
	var COOKIE_NAME = 'username';
	if( $.cookie(COOKIE_NAME) ){
		$("#username").val(  $.cookie(COOKIE_NAME) );
	}
	$("#check").click(function(){
		if(this.checked){
			$.cookie(COOKIE_NAME, $("#username").val() , { path: '/', expires: 10 });
		}else{
			$.cookie(COOKIE_NAME, null, { path: '/' });
		}
	});
});
</script>
</head>
<body>
   用户名：<input type="text" name="username" id="username"/> <br/>
   <input type="checkbox" name="check" id="check"/>记住用户名
</body>
</html>
